1. Field of the Invention
The present invention relates to a packet transmitting apparatus and a network system.
2. Description of the Related Art
In recent years, a wide-area Ethernet service has been spreading. As one of standard protocols of the Ethernet, there is a Spanning Tree Protocol (STP). The STP is for logically invalidating some ports of a physical loop existing in a network to prevent the passage of a packet, to thereby establish a logical tree network.
In some logical tree structures, therefore, a packet transmission path between different terminals connected to the network may not be an optimal path, but may be an indirect path. Further, with some ports invalidated, some paths of the physical loop structure cannot be used. As a result, there arises a problem that a load cannot be dispersed.
Furthermore, a packet transmitting apparatus disposed at each of nodes of the network performs software processing, such as the generation and interpretation of a Bridge Protocol Data Unit (BPDU). Thus, there is a problem in that a load on a Central Processing Unit (CPU) of each packet transmitting apparatus is increased. As a measure to solve the above problems, an extended form of the STP called Multiple Spanning Tree Protocol (MSTP) has been conceived of.
According to the MSTP, a plurality of trees are established in the network, and a different tree is used for each Virtual Local Area Network (VLAN) to disperse the load. However, a similar problem to the problem of the STP described above occurs also in the MSTP among terminals included in the same VLAN.
Further, the packet transmitting apparatus disposed at each of the nodes processes information of the plurality of trees. Thus, there is a problem in that the load on the CPU is further increased. Furthermore, if a trouble occurs in the CPU, the protocol may not operate as desired, and thus a loop may be formed.
Still further, in the STP and the MSTP, the BPDU is abandoned after having passed through a fixed number of nodes, e.g., twenty nodes. Thus, there is a problem of scalability in that a network of a larger scale cannot be established. As a measure to solve the above-described various problems of the STP and the like, there is a so-called previous arrival port learning system for learning, as the port on the optimal path, a port of the packet transmitting apparatus of each node at which a packet first arrives.
FIG. 12 is a diagram for explaining an outline of a conventional previous arrival port learning system. As illustrated in FIG. 12, firstly, an unlearned packet 6 addressed to a terminal L2 arrives from a terminal K1 at the first port of a packet transmitting apparatus 4 of a node B. The packet transmitting apparatus 4 of the node B transmits the packet to next destinations from the ports of the apparatus other than the port at which the packet has arrived (the second and third ports in the illustrated example). The packet transmission from the ports other than the arrival port is hereinafter referred to as flooding.
The unlearned packet herein refers to a packet, the optimal path for which has not been learned, since a packet of the same source-destination combination as the source-destination combination of the unlearned packet has not arrived at a node. In a packet transmitting apparatus 3 of a node A, a packet 7 transmitted from the node B arrives at the first port of the apparatus.
If the packet 7 is unlearned at the node A, the packet transmitting apparatus 3 of the node A transmits the packet to a next destination from the port other than the port at which the packet has arrived (the second port in the illustrated example). In the above process, the packet transmitting apparatus 3 of the node A learns the port at which the unlearned packet first arrived (hereinafter referred to as the previous arrival port), in association with a source Media Access Control (MAC) address of the packet.
In some cases, the same packet as the packet which has arrived at the previous arrival port (hereinafter referred to as the previous arrival packet) arrives at a not-illustrated port of the packet transmitting apparatus 3 of the node A later than the arrival of the packet 7 at the previous arrival port (hereinafter referred to as the later arrival packet). In this case, the packet transmitting apparatus 3 of the node A abandons all later arrival packets. In a packet transmitting apparatus 5 of a node C, a packet 8 transmitted from the node B first arrives at the second port of the apparatus, and then a packet 9 transmitted from the packet transmitting apparatus 3 of the node A arrives at the third port of the apparatus.
The packet transmitting apparatus 5 of the node C transmits a packet 10 to the terminal L2 from the port of the apparatus other than the ports at which the previous arrival packet 8 and the later arrival packet 9 have arrived (the first port in the illustrated example). Then, the packet transmitting apparatus 5 of the node C abandons the later arrival packet 9. Further, the packet transmitting apparatus 5 of the node C registers the previous arrival port and the source MAC address of the previous arrival packet 8 in a MAC address table 11 of the apparatus, with the previous arrival port and the source MAC address associated with each other. Thereby, the relationship between the MAC address of a terminal and the port used to transmit a packet addressed to the terminal has been learned at each of the nodes.
When a packet addressed to the terminal K1 arrives from the terminal L2 at the node C, the packet transmitting apparatus 5 of the node C refers to the MAC address table 11, similarly as in a normal Ethernet switch. In the MAC address table 11, there is an entry of x as the MAC address of the terminal K1, and the second port is registered as the port to be used, as illustrated in FIG. 12. Therefore, the packet addressed to the terminal K1 is a learned packet. The packet transmitting apparatus 5 of the node C transmits the learned packet from the second port.
An inter-LAN connecting device for determining the optimal path in accordance with the above-described previous arrival port learning system is disclosed in Japanese Unexamined Patent Application Publication No. 4-40032. The device includes: means for registering, upon receipt of a first message relating to a source station and a destination station from a network connected to the device, a first type of address information, which includes the address of the source station and the address of the device, in a corresponding entry in an address conversion table for the source station, and transmitting the received message onto an internal network in a multi-address mode; and means for registering, when a message received from the internal network is the first message relating to the source station and the destination station, a second type of address information, which includes the address of the source station and the address of a source interface, in a corresponding entry in the address conversion table for the source station, and transmitting the received message onto the network connected to the device.
According to the conventional previous arrival port learning system, however, the port of each of the nodes at which the packet first arrived is registered as the previous arrival port. Thus, the previous arrival port is limited to one port. In some actual cases, however, packets substantially simultaneously arrive at a plurality of ports of a node. According to the conventional system, one of the ports is selected as the previous arrival port also in the above case. Therefore, the conventional system has a problem in that, even if traffic concentrates on a path passing through the selected previous arrival port, a load cannot be dispersed to a path passing through another port.
To solve the above-described problems of the conventional techniques, an object of the present invention is to provide a packet transmitting apparatus having a function of learning the optimal path in accordance with the previous arrival port learning system, in which a plurality of ports can be selected as the previous arrival ports and handled as a previous arrival port group. Further, another object of the present invention is to provide a network system in which a packet transmitting apparatus having the above function is disposed at each of nodes of a network to enable the dispersion of the load caused by the concentration of traffic and so forth.